//
//  TourViewController.m
//  CivilianTravel
//
//  Created by 许仕杰 on 16/7/14.
//  Copyright © 2016年 许仕杰. All rights reserved.
//

#import "TourViewController.h"
#import "ViewController1.h"
#import "ViewController.h"
#import "ViewController2.h"
#import "ViewController3.h"
#import "ViewController4.h"

@interface TourViewController ()

@end

@implementation TourViewController

- (WMPageController *) getPages {
    //WMPageController中包含的页面数组
    NSArray *controllers = [NSArray arrayWithObjects:[ViewController class], [ViewController1 class],[ViewController2 class], [ViewController3 class],[ViewController4 class],nil];
    //WMPageController控件的标题数组
    NSArray *titles = [NSArray arrayWithObjects:@"英文导游", @"景点导游", @"金牌导游",@"日语导游",@"其他导游",nil];
    //用上面两个数组初始化WMPageController对象
    WMPageController *pageController = [[WMPageController alloc] initWithViewControllerClasses:controllers andTheirTitles:titles];
    //设置WMPageController每个标题的宽度
    pageController.menuItemWidth = 100;
    //设置WMPageController标题栏的高度
    pageController.menuHeight = 35;
    //设置WMPageController选中的标题的颜色
    pageController.titleColorSelected = [UIColor colorWithRed:200 green:0 blue:0 alpha:1];
    return pageController;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    WMPageController *pageController = [self getPages];
    [self addChildViewController:pageController];
    [self.view addSubview:pageController.view];
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}



@end
